Object Oriented Programming

IMPORTANT

Object Oriented Programming: Overview

This topic covers concepts, such as Inheritance in OOP, Polymorphism in OOP, Instances in OOP, Abstraction in OOP, Properties of an Object in OOP, OOPS - Object-Oriented Programming System, Objects in OOP, and Classes in OOP.

Important Questions on Object Oriented Programming

MEDIUM
IMPORTANT

Which among following is correct for initialising the class below?
class student{
int marks;
int cgpa;
   public: student(int i, int  j){
marks=I;
cgpa=j
}
};

MEDIUM
IMPORTANT

Which feature of OOP is indicated by the following code?

class student{  int marks;  };
class topper:public student{  int age;  topper(int age){   this.age=age;  }   };

EASY
IMPORTANT

___________ underlines the feature of Polymorphism in a class.

HARD
IMPORTANT

Which class/set of classes can illustrate polymorphism in the following C++ code?

abstract class student
{
   public : int marks;
   calc_grade();
}
class topper:public student
{
    public : calc_grade()
    { 
        return 10; 
    }
};
class average:public student

     public : calc_grade()
     {
         return 20; 
     }
};
class failed{ int marks; };

MEDIUM
IMPORTANT

Which feature of OOP is exhibited by the function overriding?

EASY
IMPORTANT

Best way to described  Inheritance is___________

EASY
IMPORTANT

 Which feature of OOP reduces the use of nested classes?

EASY
IMPORTANT

Abstraction principle includes___________

MEDIUM
IMPORTANT

 What is an abstraction in object-oriented programming?

EASY
IMPORTANT

Which header file is required in C++ to use OOP?

EASY
IMPORTANT

 Object declared in main() function _____________

EASY
IMPORTANT

Which is not the property of object in OOPS?

EASY
IMPORTANT

In multilevel inheritance, which is the most significant feature of OOP used?

EASY
IMPORTANT

 Which is the correct syntax of inheritance?

MEDIUM
IMPORTANT

Which of the following is not correct (in C++) ?

i) Class templates and function templates are instantiated in the same way

ii) Class templates differ from function templates in the way they are initiated

iii) Class template is initiated by defining an object using the template argument

iv) Class templates are generally used for storage classes.

MEDIUM
IMPORTANT

Which of the following is a valid class declaration?

EASY
IMPORTANT

How many objects can be declared of a specific class in a single program?

EASY
IMPORTANT

 Which definition best describes an object?

EASY
IMPORTANT

Which is the example of object-oriented language.
 

EASY
IMPORTANT

Which of these features of OOP would indicate code reusability?